// baseUrl
let baseURL = '';
// 社区医院id
let hospitalId = '';
// 委托书 文章id
let authorizeProxyArticleId = '';
// 协议内容 文章id
let agreementArticleId = '';
// 升级款标签名称
let seniorName;
// 基础款标签名称
let basicsName;
// 商户号
let memberId;
// 跳往h5的url
let webBaseUrl;
// 问询协议ID
let agreementId;
// 阅读并同意协议使用 /pagesC/service/serviceSale
let articleArr;

// 7天免费试用服务包id
let videoDoctor7TrialServiceId = 96;

let inquiryLink; // 通用问询链接
let env;
let resultLink = 'https://d-bx.wanhuhealth.com/result.html'; // 服务包购买结果页面
// let resultLink = 'http://192.168.1.246:8080/result.html'; // 服务包购买结果页面

// pro: 线上环境, demo: demo环境, test: test环境
let ENV = 'demo';

if (process.env.NODE_ENV === 'production') {
  ENV = 'pro';
}

let registerSource = 7; // 注册来源
// 配置hospitalId （如：二维码扫码进入有hospitalId参数）
export const setHospitalIdFun = function (id) {
  if (id) {
    hospitalId = id;
  }
};
switch (ENV) {
  case 'pro':
    baseURL = 'https://weixin-api.wanhuhealth.com';
    hospitalId = '6ff2fa9979f34b4fbbd4ba33aa32e45e';
    authorizeProxyArticleId = '1353';
    agreementArticleId = '1352';
    seniorName = '万户健康保障计划意向';
    basicsName = '万户健康防病计划意向';
    memberId = '310000016002813102';
    webBaseUrl = 'https://wuhuwx.wanhuhealth.com/'; // 跳转健康课h5域名
    agreementId = '1261';
    articleArr = [1302];
    videoDoctor7TrialServiceId = 96; // 7天免费试用服务包id
    inquiryLink = 'https://bx.wanhuhealth.com/common/index.html'; // 通用问询链接
    resultLink = 'https://d-bx.wanhuhealth.com/result.html';
    env = 'p';

    break;
  case 'demo':
    baseURL = 'https://ddemo.wanhuhealth.com'; // demo环境参数 正式环境要改
    hospitalId = 'cd0127a43b574848b331ec48a70dffe6'; // demo环境参数 正式环境要改
    authorizeProxyArticleId = '1053'; // demo环境参数 正式环境要改
    agreementArticleId = '1052'; // demo环境参数 正式环境要改
    seniorName = '万户健康大病计划意向'; // 升级款服务包标签名称
    basicsName = '万户健康基础计划意向'; // 基础款服务包标签名称
    webBaseUrl = 'https://demo-wuhuwx.wanhuhealth.com/'; // 跳转健康课h5域名
    memberId = '310000016002813102';
    agreementId = '502';
    articleArr = [5];
    videoDoctor7TrialServiceId = 160; // 7天免费试用服务包id
    inquiryLink = 'https://d-bx.wanhuhealth.com/common/index.html';
    env = 'd';

    break;
  case 'test':
    baseURL = 'https://ttest.wanhuhealth.com';
    hospitalId = 'dab21f9a062a43978fedd86496f0c364';
    authorizeProxyArticleId = '14';
    agreementArticleId = '36';
    seniorName = '公益百万大病计划意向';
    basicsName = '公益基础计划意向';
    memberId = '310000016002813102';
    webBaseUrl = 'https://wuhuwx.wanhuhealth.com/'; // 跳转健康课h5域名
    agreementId = '502';
    articleArr = [14];
    videoDoctor7TrialServiceId = 173; // 7天免费试用服务包id
    inquiryLink = 'https://d-bx.wanhuhealth.com/common/index.html';
    env = 't';
    break;

  default:
    baseURL = 'https://weixin-api.wanhuhealth.com';
    hospitalId = '6ff2fa9979f34b4fbbd4ba33aa32e45e';
    authorizeProxyArticleId = '1353';
    agreementArticleId = '1352';
    seniorName = '万户健康保障计划意向';
    basicsName = '万户健康防病计划意向';
    memberId = '310000016002813102';
    webBaseUrl = 'https://wuhuwx.wanhuhealth.com/'; // 跳转健康课h5域名
    agreementId = '1261';
    articleArr = [1302];
    videoDoctor7TrialServiceId = 96; // 7天免费试用服务包id
    inquiryLink = 'https://bx.wanhuhealth.com/common/index.html'; // 通用问询链接
    env = 'p';
    break;
}

// 项目id
let commonProjectType = 6;

export {
  hospitalId,
  authorizeProxyArticleId,
  agreementArticleId,
  baseURL,
  seniorName,
  basicsName,
  memberId,
  webBaseUrl,
  agreementId,
  articleArr,
  videoDoctor7TrialServiceId,
  registerSource,
  inquiryLink,
  resultLink,
  commonProjectType,
  env
};
